/**
 * @file ngineclient.h
 * @author Suk Robert Koh (srkoh87z@gmail.com)
 *
 * @brief Server-side NGine class for application's interaction with NGine
 */

#ifndef NGINESERVER_H_
#define NGINESERVER_H_

#include "ngserver.h"
#include "ngtcpserver.h"
#include "../common/utility/nglogger.h"
#include "../common/ngproperties.h"
#include "../common/ngtypes.h"

/**
 * @class	NGineServer	Server-side NGine class for application's interaction with NGine
 */
class NGineServer
{
public:
	static void init(int port, int maxUser, int property);

	static int getQueueSize();
	static NGMessage *getFirstMessage();

	static void sendMessage(BYTE type, const char *message, DWORD userId);
	static void sendMessageAll(BYTE type, const char *message);
	static void sendMessageAll(BYTE type, const char *message, DWORD excludeUserId);

private:
	NGineServer();
	virtual ~NGineServer();

	static NGServer *server;							/** Server instance */
};

#endif /* NGINE_H_ */
